﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpLoadFilePage.aspx.cs"
    Inherits="GtsServer.Manage.IISPage.CommonPage.UpLoadFilePage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Content/Jquery/uploadify/jquery.uploadify.v2.1.4.js" type="text/javascript"></script>
    <script src="../Content/Jquery/uploadify/swfobject.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $('#file_upload').uploadify({
                'uploader': '../Content/jquery/uploadify/uploadify.swf',
                'script': '../Ajax/CommonAjax.ashx?action=UploadFunc',
                'cancelImg': '../Content/jquery/uploadify/cancel.png',
                'multi': false,
                'width': 120,
                'height': 30,
                'fileExt': '*.*',
                'fileDesc': '请选择文件',
                'fileSizeLimit': 45 * 1024 * 1024,
                'auto': true,
                'onComplete': function (event, queueId, fileObj, response, data) {
                    var info = response.split('|');
                    if (info[0] == "True") {
                        $("#txtPath").val(info[1]);
                        alert("文件上传成功！");
                    }
                }
            });
        });

    </script>
</head>
<body>
    <div>
        <input type="file" name="file_upload" id="file_upload" /></div>
    <div>
        <input type="text" id="txtPath" /></div>
</body>
</html>
